package com.zyh.controller;


import com.zyh.entity.ResultEntity;
import com.zyh.entity.SkuInfo;
import com.zyh.service.ISkuInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * sku信息 前端控制器
 * </p>
 *
 * @author zhang
 * @since 2022-05-11
 */
@RestController
@RequestMapping("/skuInfo")
public class SkuInfoController {
    @Autowired
    private ISkuInfoService skuInfoService;

    //添加SKU
    @PostMapping("/add")
    public ResultEntity add(@RequestBody SkuInfo skuInfo){
        return ResultEntity.ok(skuInfoService.save(skuInfo));
    }
}

